<HTML><HEAD><TITLE>MessageQueue.js</TITLE></HEAD><BODY>
<A NAME="_top_"></A><PRE><A HREF="index.html">Index Files</A> </PRE><HR/>
<H1>File MessageQueue.js</H1>
 Provides a simple queue to add messages in. <P><DL><DT><B>Author:</B></DT><DD>Carlos Eduardo Goncalves</DD></DL></P>
<HR/>
<A HREF=#MessageQueue>MessageQueue</A><BR/>
<A HREF=#MessageQueue.messages >MessageQueue.messages </A><BR/>
<A HREF=#MessageQueue.add>MessageQueue.add</A><BR/>
<A HREF=#MessageQueue.remove>MessageQueue.remove</A><BR/>
<A HREF=#MessageQueue.getMessage>MessageQueue.getMessage</A><BR/>
<A HREF=#MessageQueue.clear>MessageQueue.clear</A><BR/>
<A HREF=#MessageQueue.hasActiveMessage>MessageQueue.hasActiveMessage</A><BR/>
<HR/>
<A NAME=MessageQueue></A>
<H2>Constructor MessageQueue</H2><PRE>function MessageQueue()</PRE>  <p>AJAX message queue constructor.</p><P></P><BR/><BR/>
<A NAME=MessageQueue.messages ></A>
<H2> Attribute MessageQueue.messages </H2><PRE>MessageQueue.messages </PRE> <p>Array that holds all active messages.</p> <P></P><BR/><BR/>
<A NAME=MessageQueue.add></A>
<H2> Method MessageQueue.add</H2><PRE>MessageQueue.add = function(msg)</PRE>  <p>Add a new AJAX message to the queue.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> value object to be added.	 </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>MessageWrapper</code> instance stored on the queue.</DD></DL></P><BR/><BR/>
<A NAME=MessageQueue.remove></A>
<H2> Method MessageQueue.remove</H2><PRE>MessageQueue.remove = function(msg_id)</PRE>  <p>Remove an AJAX message from the queue.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg_id</I></TD><TD><code>Message<code> unique identifier on the message queue. 		</TD></TR></TABLE></P><BR/><BR/>
<A NAME=MessageQueue.getMessage></A>
<H2> Method MessageQueue.getMessage</H2><PRE>MessageQueue.getMessage = function(msg_id)</PRE>  <p>Method used to safe access messages array and recover a message wrapper.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg_id</I></TD><TD><code>Message</code> unique identifier on the message queue.	 </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>MessageWrapper</code> instance or <code>null</code>.</DD></DL></P><BR/><BR/>
<A NAME=MessageQueue.clear></A>
<H2> Method MessageQueue.clear</H2><PRE>MessageQueue.clear = function()</PRE>  <p>Method used to clear message queue.</p><P></P><BR/><BR/>
<A NAME=MessageQueue.hasActiveMessage></A>
<H2> Method MessageQueue.hasActiveMessage</H2><PRE>MessageQueue.hasActiveMessage = function()</PRE>  <p>Check if the queue has any active message.</p> <p>Silent messages are ignored.</p> <P><DL><DT><B>Returns:</B></DT><DD><code>Boolean</code> flag that indicates if the are active messages.</DD></DL></P><BR/><BR/>
</BODY></HTML>
